package org.mdrtwell.proxy;

public class ProxySubject extends Subject {
	private RealSubject	realSubject;

	@Override
	public void request() {
		preRequest();
		if (realSubject == null) {
			realSubject = new RealSubject();
		}
		realSubject.request();
		postRequest();
	}

	private void postRequest() {
		System.out.println(" post do. ");
	}

	private void preRequest() {
		System.out.println(" pre do. ");
	}
}
